package com.eusun.design.command;

public class Client {
    public static void main(String[] args) {
        Light light = new Light();
        LightOnCommand lightOnCommand = new LightOnCommand(light);
        LightOffCommand lightOffCommand = new LightOffCommand(light);
        RemoteControlWithUndo control = new RemoteControlWithUndo();
        control.setCommand(0, lightOnCommand, lightOffCommand);
        control.onButtonWasPushed(0);
    }
}
